Fix traceback and incorrect completions using SubprocessCompleter
#289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like using
SuppressCompleter()
(#224) raises during argument completion which results in some completions getting unexpectedly suppressed. This fixes the issue bymakingchecking if the completions should be suppressed prior to checking what type of completer to use.SuppressCompleter()
callableProblem
Consider this python script:
Python script with completion
./suppress.py <tab><tab>
displays files in the current directory, but I don't want that.Using
export _ARC_DEBUG=true
I can see the file I don't want completed comes fromlaunch_arguments
So I added
SuppressCompleter
tolaunch_arguments
.Python script with suppressed completion
But now with
_ARC_DEBUG
I see an exception:And the files I don't want completed are still completed, plus the completions for
--print
are gone.Workaround
I can work around this by making a subclass that is callable.
Python script with callable subclass of SupressCompleter
And that gets the completions I'm looking for: